# coding: utf8

response.menu_address = [
    (T('Address'), False, URL(request.application,'address','index'),
     [
            (T('Display User Information'), False, 
             URL(request.application, 'address', 'display_donor_infomation_page')),
            (T('Check For Donor Address'), False, 
             URL(request.application, 'address', 'check_for_donor_address')),
            (T('Add New Address'), False, 
             URL(request.application, 'address', 'create_new_address')),
         ]
    ),
    ]

@auth.requires(auth.has_membership(auth.id_group('uc_group_management')))
def display_authenticated_user_menus():
    '''
    The response menus contents are in menu.py
    Depending on the users group membership(s)
    one or more of the following response.menu(x)
    is appended to the applications var called
    response.menu.
    '''
    response.menu += response.menu_address
    if auth.has_membership('uc_group_developer'):
        response.menu += response.menu_developer
#    if auth.has_membership('uc_group_canvasser'):
#        response.menu += response.menu_canvasser
#    if auth.has_membership('uc_group_canvasser_administrator'):
#        response.menu += response.menu_canvasser_administrator
#    if auth.has_membership('uc_group_site_administrator'):
#        response.menu += response.menu_site_administrator
